package classes;

import introspector.MyBean;

import java.lang.reflect.ParameterizedType;

abstract class AbstractDemo<T> {
	public Class getSpClass() {
		return (Class) ((ParameterizedType) getClass()
                .getGenericSuperclass()).getActualTypeArguments()[0];
	}
}

public class ClassesDemo extends AbstractDemo<MyBean>{
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ClassesDemo d = new ClassesDemo();
		System.out.println(d.getSpClass().getName());
	}

}
